package com.lanzchina.lanclass.controller;

import com.lanzchina.lanclass.domain.Result;
import com.lanzchina.lanclass.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserController {

    @Autowired
    private UserService userService;

    @PostMapping("/validateOpenId")
    public Result validateOpenId(String code, String validateCode) {
        return userService.findByCode(code, validateCode);
    }
}
